package com.liruo.treasureattic.common.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.liruo.treasureattic.common.model.constant.TreasureAtticConstant;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @TableName url_folder id=1的一定要保留，不能给任何folder
 * 如果是默认default，cnt是总cnt，folder_cnt是总folder_cnt
 */
@TableName(value ="ta_url_folder")
@Data
public class UrlFolder implements Serializable {
    /**
     * id 不能是 1,因为id=1是保留的，不能有任何folder的id=1
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * user_id
     */
    private Long uid;

    /**
     * All secondary fid should be the default folder.
    *  or url
     *  fid = 1 is a default url folder
     */
    private Long fid;
    /**
     * max=128
     */
    private String name;

    private Boolean open;

    /**
     * createdTime
     */
    private LocalDateTime ctime;
    /**
     * updateTime
     */
    private LocalDateTime utime;

    /**
     * 0-没删除，1-删除
     */
    @TableLogic
    private Boolean deleted;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = TreasureAtticConstant.TREASURE_ATTIC_VERSION;
}